<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()	+ path + "/";
	request.setCharacterEncoding("UTF-8");
	response.setContentType("text/html;charset=UTF-8");
%>
<jsp:include page="changePwd.jsp" flush="true"/>
<script type="text/javascript">
	var ctx="<%=path%>";  
</script>
<link rel="stylesheet" href="<%=path%>/css/glsmcx.css" type="text/css" />
<link rel="stylesheet" href="<%=path%>/css/upload.css" type="text/css" >
<script type="text/javascript" src="<%=path%>/js/controllers/orderaftersaleCtrl.js"></script>
<input type="hidden" id="isInterior" value="${_user_supplier.isInterior}" />
<div class="glsmcxWrap">
	<div class="container-fluid">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">售后订单列表</h3>
			</div>
			<input id="queryType" value="ht" style="display:none;"></input>
			<div class="panel-body clearfix">
				<form method="post" action="#" class="form-horizontal" role="form">
					<!-- 查询开始 -->
					<div class="form-group">
						<div class="col-lg-31 clearfix">							
						<label class="control-label labelPart">订单号：</label>
							<div class="colPart">
								<input type="text" class="input-sm form-control" id="orderId" placeholder="输入订单号">
							</div>
						</div>			
							
						<div class="col-lg-31 clearfix">						
						<!-- 售后状态，1未处理，2处理中，3已完成 -->	
							<label class="control-label labelPart">退款状态：</label>							
							<div class="colPart">
								<select name="status">
									<option value="">请选择</option>
									<option value="1">未处理</option>
									<option value="2">处理中</option>
									<option value="3">已完成</option> 
								</select>
							</div> 						
						</div>  
						
						<div class="col-lg-31 clearfix">						
						<!-- 客服审核状态，1待审核，2审核通过，3审核不通过 -->	
							<label class="control-label labelPart">审核状态：</label>							
							<div class="colPart">
								<select name="serviceAuditStatus">
									<option value="">请选择</option>
									<option value="1">待审核</option>
									<option value="2">审核通过</option>
									<option value="3">审核不通过</option> 
								</select>
							</div> 						
						</div>  
						 
						 
						<div class="col-lg-34 more clearfix"> 													
							<button type="button" class="searchBtn">查询</button>	
							<button type="button" class="clearBtn">清空</button>					
						</div>
					</div> 
					<div class="table-responsive">
						<table class="table table-bordered check left">
							<thead>
								<tr>  			
									<th>序号</th>
									<th>订单号</th> 
									<th>售后状态</th>
									<th>售后原因</th>  
								    <th>申请备注</th>
								    <th>申请时间</th>  
								    <th>客服审核</th>
								    <th>供应商审核</th>
								    <th>操作</th> 
								</tr>
							</thead>
		
							<tbody id="dataBody">
								 
							</tbody>
						</table>
						
						<table class="table2excel table table-bordered hide">
						</table>
					</div>
				</form>
			</div>
		</div>
		<div class="clearfix pageBottom">	
			<div class="record-wrapper page" role="status" aria-live="polite">
				当前<span class="pageNo"> </span>/<span class="totalPages"> </span>页，每页
				<label class="inline">
					<select name="dataTable_length" 
						class="form-control input-sm setTableLength" aria-controls="dataTable">
						<option selected="selected" value="10">10</option>
						<option value="20">20</option>
						<option value="50">50</option>
						<option value="100">100</option>
						<option value="200">200</option>
						<option value="300">300</option>
						<option value="400">400</option>
						<option value="500">500</option>
						<option value="1000">1000</option>
				</select> 
				</label>&nbsp;条记录,共<span class="record-wrapper totalCount">0</span>条记录
			</div>
			<nav>
			<!-- 这里显示分页 -->
				<div id="Pagination" class="pagination"></div>
			</nav>
		</div>
			
	</div>
</div>


<!-- 订单详情Modal -->
<div class="modal fade modal-edityd" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
				</button>
				<h4 id="myModalLabel">订单详情</h4>
			</div>
			<form class="form-horizontal" novalidate="novalidate" id="orderDetailForm">
				<div class="modal-body"> 
					<div class="form-group">
						<div class="col-lg-31">
							<label class="col-sm-41 control-label" id="orderid-label">订单号：</label>
							<div class="col-sm-81">
								<input type="hidden" class="form-control input-sm" name="id">
								<input type="text" readonly="readonly" class="form-control input-sm" placeholder="" name="orderId">
							</div>
						</div>

						<div class="col-lg-31">
							<label class="col-sm-41 control-label">贸易类型：</label>
							<!-- 贸易类型，1保税直供，2国内发货，3海外直邮，4海外交货，待确认 -->
							<div class="col-sm-81"> 
								<select disabled="disabled" name="tradeType" value="" class="form-control">
									<option value="1">保税直供</option>
									<option value="2">国内发货</option>
									<option value="3">海外直邮</option>
									<option value="4">海外交货</option>
								</select> 
							</div>
						</div>
						
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">订单状态：</label>
							<div class="col-sm-81 dropdown"> 
								<input type="text" readonly="readonly" class="form-control input-sm  current-time" readonly name="status"> 
								<!-- <select disabled="disabled" name="status" value="" class="form-control">
									<option value="1"> </option>

								</select> -->
							</div>
						</div>  
						
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">下单时间：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm  current-time" readonly name="createTime"> 
							</div>
						</div>
					</div>

					<div class="form-group">
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">支付时间：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm  current-time" readonly name="paymentTime"> 
							</div>
						</div>
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">支付方式：</label>
							<div class="col-sm-81 dropdown">  
							<!-- 支付方式，1微信，2支付宝，3刷卡，4线下支付 -->
								<select disabled="disabled" name="paymentType" value="" class="form-control">
									<option value="1">微信</option>
									<option value="2">支付宝</option>
									<option value="3">刷卡 </option>
									<option value="4">线下支付</option>
									<option value="5">系统预付款</option>
								</select>
							</div>
						</div>
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">收货人：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm  current-time" readonly name="receiver"> 
							</div>
						</div>
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">手机号：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm  current-time" readonly name="receiverMobile"> 
							</div>
						</div>
					</div>

					<div class="form-group">
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">身份证号：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm" placeholder="0.00" name="receiverIdnumber">
							</div>
						</div> 
						
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">收货地址：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm" name="receiverPcdt" >
							</div>
						</div>
						
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">物流公司：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm" name="logisticsName">
							</div>
						</div> 
						
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">物流单号：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm" placeholder="物流单号" name="logisticsNumber">
							</div>
						</div>
					</div> 

					<div class="form-group">
						
						<div class="col-lg-31">
							<label class="col-sm-41 control-label">发货时间：</label>
							<div class="col-sm-81">
								<input type="text" readonly="readonly" class="form-control input-sm " placeholder="发货时间" name="deliveryTime"> 
							</div>
						</div> 
						
						<div class="col-lg-31" id="sendaddr1">
							<label class="col-sm-41 control-label">商家备注：&nbsp;</label>
							<div class="input-group col-sm-81"> 
								<input type="text" class="input-sm form-control" name="merchantRemark" placeholder="商家备注" readonly="readonly">
							</div>
						</div> 
					</div>

					<div class="form-group">  
						<div class="col-lg-61" id="receiveraddr1">
							<label class="col-sm-41 control-label ">订单留言：&nbsp;</label>
							<div class="col-sm-161">
								<div class="colPart6 dropdown">	
									<input type="text" class="input-sm form-control" placeholder="订单留言" name="orderRemark" readonly="readonly">	 
								</div> 
							</div>	 
						</div> 
						
						 
					</div> 

					<div class="form-group"> 
						<div class="col-lg-122" id="receiveraddr1" style="text-align: center">
							<table class="table" style="margin: auto">
								<thead >
									<tr> 
									    <th style="text-align: center;">商品货号</th>
									    <th style="text-align: center;">商品名称</th>
									    <th style="text-align: center;">效期</th>
									    <th style="text-align: center;">数量</th> 
										<th style="text-align: center;">规格</th>
										<th style="text-align: center;">供货价</th>
										<th style="text-align: center;">供货价小计</th>  
									</tr>
								</thead>
	
								<tbody id="orderDetailDataBody">
									 
								</tbody>
							</table>
						</div>
					</div> 
			</div> 
			</form>
			<div class="modal-footer  clearfix">
				
				
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> 
				
			</div>
		</div>
	</div>
</div>
<!-- 订单详情Modal -->

<!-- 售后订单审核s -->
<div class="modal fade modal-audit-aftersale modal-detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content"> 
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
				</button>
				<h4 id="myModalLabel">售后订单审核</h4>
			</div>
			<div class="modal-body">
			<form class="form-horizontal" novalidate="novalidate" id="auditOrderAftersaleForm"> 
				<input type="hidden" name="id" />
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label" id="orderid-label">订单号：</label>
						<div class="col-sm-81">
							<input type="hidden" class="form-control input-sm" name="id">
							<input type="text" readonly="readonly" class="form-control input-sm" name="orderId">
						</div>
					</div>
				</div>
				
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label" id="orderid-label">退款金额：</label>
						<div class="col-sm-81"> 
							<input type="text" class="form-control input-sm" name="amount" />
						</div>
					</div>
				</div>	 
				
				<div class="form-group">
					<div class="col-sm-161">
						<label class="col-sm-41 control-label">审核意见：</label>
						<div class="colPart6 dropdown">	
							<input type="text" style="height:40px" name="serviceAuditOpinion" 
								class="input-sm form-control" placeholder="请输入审核意见或备注信息">	 
						</div> 
					</div>
				</div> 
			</form> 
			</div>
			<div class="modal-footer"> 
				<span  class="errorMsg red"></span> 
				<button type="button" class="btn btn-success" id="btn_audit_pass">通过</button>
				<button type="button" class="btn btn-danger" id="btn_audit_notpass">不通过</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>	 
		</div>	 
	</div>
			
</div>
<!-- 售后订单审核e -->


<!-- 供应商审核售后订单s -->
<div class="modal fade modal-supplier-audit-aftersale modal-detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content"> 
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
				</button>
				<h4 id="myModalLabel">处理售后订单</h4>
			</div>
			<div class="modal-body">
			<form class="form-horizontal" novalidate="novalidate" id="supplierAuditOrderAftersaleForm"> 
				<input type="hidden" name="id" />
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label" id="orderid-label">订单号：</label>
						<div class="col-sm-81">
							<input type="hidden" class="form-control input-sm" name="id">
							<input type="text" readonly="readonly" class="form-control input-sm" name="orderId">
						</div>
					</div>
					
					<div class="col-lg-31">
							<label class="col-sm-41 control-label">售后原因：</label>
							<div class="col-sm-81"> 
							<!-- 售后原因，1错发/漏发，2拒签退回，3丢件，4瘪罐，99其他 -->
								<select disabled="disabled" name="causeType" value="" class="form-control">
									<option value="1">错发/漏发</option>
									<option value="2">拒签退回</option>
									<option value="3">丢件</option>
									<option value="4">瘪罐</option>
									<option value="99">其他</option>
								</select> 
							</div>
						</div>
					
				</div> 
				
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label" id="orderid-label">退款金额：</label>
						<div class="col-sm-41"> 
							<input type="text" readonly="readonly" class="form-control input-sm" name="amount" />  
						</div>
						<div>
							&nbsp;<span style="font-size: small;" id="reset-amount" ><a style="cursor: pointer" title="点击输入确认价，等待客服联系">不认同？</a></span>
						</div>
					</div>
					
					<div class="col-lg-61" id="supplier-audit-amount-div" style="display: none" >
						<label class="col-sm-41 control-label" id="orderid-label">退款金额：</label>
						<div class="col-sm-81"> 
							<input type="text" class="form-control input-sm" name="supplierAuditAmount" />
						</div>
					</div>
					
				</div> 
				
				<div class="form-group">
					<div class="col-sm-161">
						<label class="col-sm-41 control-label">图片：</label>
						<div class="colPart6 dropdown">	
							<img src="" style="width: 300px" id="supplier-audit-img" />	 
						</div> 
					</div>
				</div>
				
				<div class="form-group">
					<div class="col-sm-161">
						<label class="col-sm-41 control-label">售后描述：</label>
						<div class="colPart6 dropdown">	
							<input type="text" style="height:40px" name="remark" readonly="readonly" class="input-sm form-control"  >	 
						</div> 
					</div>
				</div>
				
				<div class="form-group">
					<div class="col-sm-161">
						<label class="col-sm-41 control-label">备注：</label>
						<div class="colPart6 dropdown">	
							<input type="text" style="height:40px" name="supplierAuditOpinion" 
								class="input-sm form-control" placeholder="请输入备注信息">	 
						</div> 
					</div>
				</div> 
			</form> 
			</div>
			<div class="modal-footer"> 
				<span  class="errorMsg red"></span> 
				<button type="button" class="btn btn-success" id="btn_supplier_audit">处理完成</button> 
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>	 
		</div>	 
	</div>
			
</div>
<!-- 供应商审核售后订单e -->


<!-- 处理供应商审核审核不通过的售后订单s -->
<div class="modal fade modal-deal-aftersale modal-detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content"> 
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
				</button>
				<h4 id="myModalLabel">处理售后订单</h4>
			</div>
			<div class="modal-body">
			<form class="form-horizontal" novalidate="novalidate" id="dealOrderAftersaleForm"> 
				<input type="hidden" name="id" />
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label" id="orderid-label">订单号：</label>
						<div class="col-sm-81">
							<input type="hidden" class="form-control input-sm" name="id">
							<input type="text" readonly="readonly" class="form-control input-sm" name="orderId">
						</div>
					</div>
					
					<div class="col-lg-31">
							<label class="col-sm-41 control-label">售后原因：</label>
							<div class="col-sm-81"> 
							<!-- 售后原因，1错发/漏发，2拒签退回，3丢件，4瘪罐，99其他 -->
								<select disabled="disabled" name="causeType" value="" class="form-control">
									<option value="1">错发/漏发</option>
									<option value="2">拒签退回</option>
									<option value="3">丢件</option>
									<option value="4">瘪罐</option>
									<option value="99">其他</option>
								</select> 
							</div>
						</div>
					
				</div> 
				
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label" id="orderid-label">客户申请退款金额：</label>
						<div class="col-sm-41"> 
							<input type="text" readonly="readonly" class="form-control input-sm" name="amount" />  
						</div> 
					</div>
					
					<div class="col-lg-61" >
						<label class="col-sm-41 control-label" id="orderid-label">供应商修改退款金额：</label>
						<div class="col-sm-81"> 
							<input type="text" class="form-control input-sm" readonly="readonly" name="supplierAuditAmount" />
						</div>
					</div>
					
				</div> 
				
				<div class="form-group">
					<div class="col-sm-161">
						<label class="col-sm-41 control-label">图片：</label>
						<div class="colPart6 dropdown">	
							<img src="" style="width: 300px" id="deal-img" />	 
						</div> 
					</div>
				</div>
				
				<div class="form-group">
					<div class="col-sm-161">
						<label class="col-sm-41 control-label">售后描述：</label>
						<div class="colPart6 dropdown">	
							<input type="text" style="height:40px" name="remark" readonly="readonly" class="input-sm form-control"  >	 
						</div> 
					</div>
				</div>
				
				<div class="form-group">
					<div class="col-sm-161">
						<label class="col-sm-41 control-label">供应商审核备注：</label>
						<div class="colPart6 dropdown">	
							<input type="text" style="height:40px" name="supplierAuditOpinion" readonly="readonly"
								class="input-sm form-control"  >	 
						</div> 
					</div>
				</div> 
				
				<div class="form-group">
					<div class="col-lg-61">
						<label class="col-sm-41 control-label" id="orderid-label">最终退款金额：</label>
						<div class="col-sm-41"> 
							<input type="text" placeholder="请输入最终达成的退款金额" class="form-control input-sm" name="finalAmount" />  
						</div>
						<div> 
					</div>
					 
					
				</div> 
				
			</form> 
			</div>
			<div class="modal-footer"> 
				<span  class="errorMsg red"></span> 
				<button type="button" class="btn btn-success" id="btn_deal_audit">处理完成</button> 
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>	 
		</div>	 
	</div>
			
</div>
<!-- 处理供应商审核审核不通过的售后订单e -->